#!usr/bin/env python
# -*- coding: utf-8 -*-
from ._base import BaseModel, db
from datetime import datetime


class AdminUser(BaseModel):
    id = db.Column(db.BigInteger, primary_key=True, autoincrement=True)
    account = db.Column(db.String(100), index=True, comment=u'账号')
    password = db.Column(db.String(100), comment=u'密码')
    nick_name = db.Column(db.String(200), comment=u'昵称')
    name = db.Column(db.String(100), comment=u'姓名')
    avatar = db.Column(db.String(255), comment=u'头像')
    mobile = db.Column(db.String(20), comment=u'手机号')
    created = db.Column(db.DateTime, default=datetime.now, comment=u'创建时间')
    last_login_in_time = db.Column(db.DateTime, comment=u'最后登录时间')
    admin_type = db.Column(db.SmallInteger, comment=u'账号类型')
    status = db.Column(db.SmallInteger, comment=u'状态')
    token = db.Column(db.String(100), comment=u'登录标记(预留)')
